#include<iostream>
#include<vector>

using namespace std;

int main(){
	int n,k;
	vector<int> arr;
	vector<int> mod;
	cin>>n>>k;
	arr = vector<int>(n,0);
	mod = vector<int>(k,0);
	for(int i=0;i<n;i++){
		cin>>arr[i];
	}
	
    for (int num: arr) {
        ++mod[(num % k + k) % k];
    }
    
    for (int i = 1; i + i < k; ++i) {
        if (mod[i] != mod[k - i]) {
            cout<<"false";
            return 0;
        }
    }
    if( mod[0] % 2 != 0 ){
    	cout<<"false";
        return 0;
	}
	
	cout<<"true";
	return 0;
}
